<?php echo $html->css('default', NULL, array(),false) ?>
<?php echo $html->css('form_style', NULL, array(),false) ?>
<div id="columnA">
    <h3>Editar Instalacion</h3>
    <?php
    echo 'Los campos marcados con (*) son obligatorios.';
    echo $form->create('Instalacion',array('controller'=>'instalaciones','action'=>'editar/'.$form->value('Instalacion.id')));
    echo $form->hidden('Instalacion.id');
    echo $form->hidden('Instalacion.revision_id')
    ?>
    <table width="100%">
        <thead>
            <tr>
                <th>*Equipamiento</th>
                <th width="60">*Cantidad</th>
                <th>Descripcion</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <?php
                echo '<td>'.$this->data['Instalacionestipo']['desc_tipo_inst'].'</td>';
                echo '<td>'.$form->input("Instalacion.cant_inst",array('label'=>'','div'=>false,'class'=>'inputstyle input50')).'</td>';
                echo '<td>';
                if(count($this->data)>3){
                    for($i=0;$i<(count($this->data)-3);$i++){
                        $id_atrxinst=$this->data[$i]['Atributosxinstalacion']['id'];
                        $valor_atr=$this->data[$i]['Atributosxinstalacion']['valor_atr'];
                        $nombre_atr=$this->data[$i]['Atributo']['nombre_atr'];
                        echo $form->hidden("Atributosxinstalacion.{$i}.id",array('value'=>$id_atrxinst));
                        echo $form->input("Atributosxinstalacion.{$i}.valor_atr",array('label'=>$nombre_atr.': ','div'=>false,'class'=>'inputstyle input60','type'=>'text','value'=>$valor_atr));
                    }
                }else{
                    echo $form->input("Instalacion.observ_inst",array('label'=>'','div'=>false,'class'=>'inputstyle','rows'=>'1','cols'=>'49'));
                }
                echo '</td>';
                ?>
            </tr>
        </tbody>
    </table>
    <?php
    echo $form->button('Cancelar', array('onclick'=>'javascript:window.location="/sistemahorticola/revisiones/ver/'.$form->value('Instalacion.revision_id').'"'));
    echo $form->submit('Guardar', array('div'=>false));
    echo $form->end();
    ?>
</div>